/**********************************************
这是代码自动生成的，如果重新生成，所做的改动将会丢失
系统:gpssolution
模块:系统平台
Itop.com 版权所有
生成者：Rabbit
生成时间:2012-8-6 15:23:06
***********************************************/

using System;
using System.Threading;
using System.ComponentModel;
namespace Itop.GpsCar.Model
{
    /// <summary>
    ///[role]业务实体类
    ///对应表名:role
    /// </summary>
    [Serializable]
    public class role
    {
        
        #region Private 成员
        private int _roleid=0; 
        private string _rolename=String.Empty; 
        private string _roledesc=String.Empty; 
        private DateTime _timestamp=new DateTime(1900,1,1);   
        #endregion
  
  
        #region Public 成员
   
        /// <summary>
        /// 属性名称：roleid
        /// 属性描述：
        /// 字段信息：[roleid],INT
        /// </summary>
        [Browsable(false)]
        [DisplayNameAttribute("")]
        public int roleid
        {
            get { return _roleid; }
            set
            {			
                if (_roleid as object == null || !_roleid.Equals(value))
                {
                    _roleid = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：rolename
        /// 属性描述：
        /// 字段信息：[rolename],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string rolename
        {
            get { return _rolename; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[]长度不能大于50!");
                if (_rolename as object == null || !_rolename.Equals(value))
                {
                    _rolename = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：roledesc
        /// 属性描述：
        /// 字段信息：[roledesc],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string roledesc
        {
            get { return _roledesc; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[]长度不能大于50!");
                if (_roledesc as object == null || !_roledesc.Equals(value))
                {
                    _roledesc = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：timestamp
        /// 属性描述：
        /// 字段信息：[timestamp],TIMESTAMP
        /// </summary>
        [DisplayNameAttribute("")]
        public DateTime timestamp
        {
            get { return _timestamp; }
            set
            {			
                if (_timestamp as object == null || !_timestamp.Equals(value))
                {
                    _timestamp = value;
                }
            }			 
        }
  
        #endregion 
  
        #region 方法
        public static string Newid(){
            return DateTime.Now.ToString("yyyyMMddHHmmssffffff");
        }
        public string CreateID(){
            Thread.Sleep(new TimeSpan(100000));//0.1毫秒
            return DateTime.Now.ToString("yyyyMMddHHmmssffffff");
        }
        #endregion		
    }	
}
